package com.itheima.reggie.config;/**
 * 功能描述
 *
 * @author 唯硕
 * @date 2022/09/19  21:22
 */

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 *@ClassName MybatisPlusConfig
 *@Description TODO 配置MP分页插件
 *@Author 唯硕
 *@Date 2022/9/19 21:22
 *@Version 1.0
 */
@Configuration
public class MybatisPlusConfig {

    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
        return interceptor;

    }
}
